from django.shortcuts import render
from django.http import HttpResponse
from article.models import Article
# 作者：阿良
# 学院官网：www.aliangedu.cn

def article_list(request):
    article_list = Article.objects.all()
    return render(request, 'article/list.html', {'article_list': article_list})

def article_detail(request, id):
    article = Article.objects.get(id=id)
    return render(request, 'article/detail.html', {'article': article})

def healthz(request):
    return HttpResponse('ok')
